﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.LEDCorrective.Domain.LEDSender
{
    /// <summary>
    /// 墙体集合
    /// </summary>
    /// <remarks>
    /// #define	SCP_ADDR_LEN    	24
    /// struct _scp_wallconf_t
    /// {
    /// 	SCP_SENDERID_t	senderId;			/*发送器id*/
    /// 	u_int32_t		    modgpId;			/*模组id*/
    /// 	SCP_LOCATION_t	location;			/*模组在墙上的位置*/
    /// 	u_int8_t			ip[SCP_ADDR_LEN];/*发送器ip*/
    /// }PACKED;
    /// typedef struct _scp_wallconf_t
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct SCP_WALLCONF_T
    {
        /// <summary>
        /// 发送器id
        /// </summary>
        public SCP_SENDERID_T senderId;

        /// <summary>
        /// 模组id
        /// </summary>
        public UInt32 modgpId;

        /// <summary>
        /// 模组在墙上的位置
        /// </summary>
        public SCP_LOCATION_T location;

        /// 发送器ip
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)]
        public byte[] ip;
    }
}
